home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
pc
/
LOGIC Apple II 5.25" Library - DOS Part 3
/
DOS064.dsk
/
SURVEY DATA REDUCTION.bas
< prev
next >
Wrap
BASIC Source File
|
2012-02-16
|
4KB
|
107 lines
10 C = 57.29577951
30 DIM Q(30): DIM D(30): DIM M(30): DIM F(30)
35 CALL -936: PRINT " SURVEY DATA REDUCTION": PRINT : PRINT " AND ERROR CORRECTION"
51 PRINT : PRINT " P. LUTUS 11/77"
60 READ Q$(0),Q$(1),Q$(2),Q$(3)
70 DATA "NE","SE","SW","NW"
80 FOR DP = 1 TO 30
82 PRINT : PRINT : PRINT
83 PRINT " 0"
85 PRINT " NW NE"
86 PRINT : PRINT " 90 + 90"
87 PRINT : PRINT " SW SE"
88 PRINT " 0"
100 PRINT : PRINT "LINE NUMBER ";DP
110 PRINT : PRINT "QUADRANT (NE,SE,SW,NW, E=END) ";: INPUT A$
120 FOR T = 0 TO 3: IF A$ < >Q$(T) THEN NEXT T
125 IF A$ = "E" THEN 180
130 IF T = 4 THEN 110
140 Q(DP) = T: PRINT : PRINT "DEGREES ";: INPUT D(DP): PRINT : PRINT "MINUTES ";: INPUT M(DP)
150 PRINT : PRINT "DISTANCE (DEC. FT.) ";: INPUT F(DP)
155 IF E = 1 THEN RETURN
160 CALL -936: NEXT DP: GOTO 200
180 Q(DP) = -1
190 CALL -936
200 PRINT : PRINT " OPTIONS:"
216 PRINT : PRINT " COMPUTE(C)"
217 PRINT : PRINT " EDIT(E)"
218 PRINT : PRINT " LIST(L)"
219 PRINT : PRINT " REVISE(R)"
220 PRINT : PRINT " NEW RUN(N)";: GET A$
222 CALL -936
225 E = 0:CR = 0
230 IF A$ = "C" THEN 300
240 IF A$ = "E" THEN 600
245 IF A$ = "L" THEN 1000
246 IF A$ = "R" THEN 1600
250 IF A$ = "N" THEN 80
252 GOTO 200
300 XV = 0:YV = 0:PM = 0:OM = 0:PA = 0:OA = 0:AR = 0
305 CALL -936: PRINT : PRINT " <*> COMPUTING <*>"
310 FOR T = 1 TO DP -1
320 RA = D(T ) +(M(T )/60)
330 IF Q(T ) = 1 THEN RA = 180 -RA
340 IF Q(T ) = 2 THEN RA = 180 +RA
350 IF Q(T ) = 3 THEN RA = 360 -RA
355 RA = RA/C
360 X = F(T) *( SIN(RA)):Y = F(T) *( COS(RA))
370 XV = XV +X:YV = YV +Y
375 GOSUB 800
377 IF CR = 1 THEN RETURN
380 NEXT T: PRINT : PRINT :
390 PRINT " FINAL POSITION (DECIMAL FT):
392 PRINT : PRINT " X= ";XV
394 PRINT " Y= ";YV
400 PRINT : PRINT " AREA (SQ. FT.)= ";A
405 PRINT : PRINT " ACRES= ";(A /43560)
410 PRINT : GOSUB 2000
420 GOTO 200
600 PRINT : PRINT
605 PRINT "EDIT WHICH LINE NUMBER ";: INPUT EL:SV = DP:DP = EL:E = 1: GOSUB 82
610 E = 0:DP = SV: GOTO 200
800 PM = SQR((XV ^2) +(YV ^2))
805 IF YV = 0 THEN YV = 1E -30
810 PA = ( ATN(XV/YV) *C)
820 IF PA <0 THEN PA = 180 +PA
830 IF XV <0 THEN PA = 180 +PA
840 AR = AR +((PM *OM * SIN((OA -PA)/C))/2)
845 A = ABS(AR)
850 OA = PA: OM = PM: RETURN
883 PRINT " 0": PRINT : PRINT
1000 PRINT "LINE";: HTAB 8: PRINT "QUAD";: HTAB 15: PRINT "DEG";: HTAB 21: PRINT "MIN";: HTAB 27: PRINT "FEET"
1001 IF RE THEN RETURN
1002 FOR L = 1 TO 30
1004 IF Q(L) <0 THEN 1040
1008 PRINT : PRINT L;
1009 QF = Q(L)
1010 HTAB 8: PRINT Q$(QF);
1012 HTAB 15: PRINT D(L);
1013 HTAB 21: PRINT M(L);
1015 HTAB 27: PRINT F(L);
1020 IF PEEK(37) <21 THEN 1035
1022 PRINT : GOSUB 2000:RE = 1: GOSUB 1000: PRINT :RE = 0: GOTO 1008
1035 NEXT L
1040 PRINT : GOSUB 2000: GOTO 200
1600 PRINT : PRINT : PRINT "THIS ROUTINE WILL CHANGE"
1602 PRINT "ONE OF THE LINES TO CANCEL AN ERROR"
1603 PRINT "OF FINAL POSITION."
1604 PRINT : PRINT "IT MUST BE USED AFTER 'COMPUTE'"
1606 PRINT "AND YOU SHOULD KNOW THE LINE MOST": PRINT "LIKELY TO BE IN ERROR"
1608 PRINT : PRINT "TO RETURN TO 'OPTIONS',ENTER (R).": PRINT "TO REVISE, ENTER LINE NUMBER": PRINT "TO BE CHANGED ";: INPUT A$
1610 IF A$ = "R" THEN 200
1615 K = VAL(A$)
1616 T = K
1618 XV = -XV:YV = -YV
1620 CR = 1: GOSUB 320
1630 QI = PA/90:CR = 0
1635 IF PA >180 THEN PA = 360 -PA
1636 IF PA >90 THEN PA = 180 -PA
1640 DI = INT(PA):MI = (PA -DI) *60
1642 IF ABS(MI) <1 THEN MI = 0
1645 QI = INT(QI):DI = INT(DI)
1650 Q(K) = (QI):D(K) = (DI):M(K) = (MI):F(K) = (PM)
1660 PRINT
1670 PRINT "LINE ";K;" HAS BEEN CHANGED"
1675 IF F(K +1) = 0 THEN Q(K +1) = -1
1680 GOTO 200
2000 PRINT : PRINT " (PRESS ANY KEY TO CONTINUE)";: GET A$: CALL -936: RETURN